Redesign and start of js implementation