added animations script
refactoring and code cleanup
seperated js scripts by type