Move unit tests to subdirectory, add test support file
Expose integer parser
Update all functions to use options object
Update middlewares
Add unit tests