Moved JS Functions

moved js functions and started to work on homepage