Removed std::unique_ptr's as they were causing code complete issues in Qt Creator and were largely unneccesary. Also did a little refactoring.