Error handling! API!

Errors now show a beautiful(don't care what you say) page.  Also worked
a bit on the API department, but it's too early to say anything.