Refactored for use with bower, and requireJS