Removed jquery dependencies
Tidied code in some places
Removed some stuff