Major Rewrite. Bugfixes. Added support for custom config scripts.