Fixed layout issues with Qt and tweaked a bunch more stuff