Refactored all source files to flatten the API, use asynchronous AJAX calls, and separate internal code from packages. Currently missing localization and page tabs.