Bugfix & Refactoring