Refactor models and controllers
Add tests for controllers
Sanitize regex input
Merge pull request #36 from gojp/add-tests

Add tests