major refactor based on fancy new coffeescript jquery plugin template