Removes some dynamic allocations in favour of just storing an instance in the class.
Allocated objects are stored into unique_ptr's to automatically delete them when they go out of scope or are reassigned.
std::map in C++11 only requires it's elements to be movable and not copyable whereas QMap requires copyable elements only. unique_ptr is only movable and can't be copied hence the change.
Fixes a number of memoryleaks
Removes some dynamic allocations in favour of just storing an instance in the class. Allocated objects are stored into unique_ptr's to automatically delete them when they go out of scope or are reassigned.