completes api and tests
adds views and tests for view

Isolates pathr to a constructor