Refactoring + bugfixes.