restructured code;
added support for multiple versions; Yippii;
some cleanups; removed redutant global variables; add support for multiple configs;
bugfixes

simple fixes;
Merge pull request #1 from timgluz/refactoring

Ok, testing to merge to my branch