Cleans up layout and some magic numbers