Refactoring, credits and bugfixes, possible final commit