Completely refactored API. API now supports command line for testing and cronjobs. API is much more logical and hierarchical. Top level functions match database tables, namely shows/, episodes/, sources/, links/. Accessing an episode under shows just maps to episodes/ top-level function.