objects for all the elements wer created
objects were divided into seperate javascript files
cleaned the code