Major cleanup of the code

Cleaned up a lot of the code and used jQuery's ability to even include data attributes when extending default values. Could possibly be cleaned up even more.