Organized front-end code, addition of ajax lib