UI Layout and JS implementation