Added Q_OBJECT macros and other forgotten stuff.