removed boilerplate jquery, made code more readable
edits