layout and styling updates, optimised JS