Some minor cleaning up.
Fixed some int to qreal conversions. Also, various cleaning ups.