Rewrite basepath

Resolves #39 

Very simple, just slightly alters how we serve API declarations.
Also correctly handles void return types.