Lots of modifications

Front end Javascript moved to file
Other