Some minor cleaning up.
Done with properly using Q_OS_xxx (closes #148). Also some minor cleaning up.