Refactor clumped functions

refactored application js and widget js to be more object oriented