Initial cleanup

This commit provides a functionnal cleanup, using Q_D and
Q_DECLARE_PRIVATE instead of multiple private objects.