Some work on the JavaScript, added first CSS transitions