Added some initial Javascript that can be decoupled