Clean up and unit tests, base64url impl

Cleaned up the testing code and the jshint rules so that they pass properly. Implemented base64url encoding and added some initial unit tests for both.