Fixed styling and added some js functions