Updated layout a bit, refactored some JS