Removed jQuery dependency; refactored into more OOP-like organization