Add AMD support, exports Object, few clean ups and supports function

Reduced some redundancies such as inside `_getDataOptions`, no need to return an empty Object when you create one in the same scope, just returns it if there aren't any options.

Few other cleanups such as as ternary operator and reducing all the `return;` statements, generally just use one and pass whatever you want to it (this is so you can still run the rest of the script, manipulate anything else then return).

Broke out the mustard test into a function, it's getting a bit long for an `if () {}`. Added `String.prototype.trim` test as you're also using it and [support is flakey in all IE versions](http://caniuse.com/#search=trim).

Put the public methods on an `exports` Object, to think about what you're _exporting_ rather than passing Private methods to a public Object. It also means less maintenance inside the script when adding/changing functions.