Better route handling mechanism.

Breaks apart routes into directories for better file management and
such. Also fixes the API fully.