big refactoring to accommodate the swagger way of doing things. partial
implementation of swagger 2.0