Compleate javascript. Next phase - redesign.