Clean up some code

JSHint, AMD, packages.