Changes some default settings to improve vertical layout. Also moved some code to a more suitable spot to prevent unneccesary loops.