Removed jQuery dependency

-various changes to remove dependency on jQuery methods