Cleaned up some code and did minor adjustments to layout