cleaned up and some jquery