Refactoring; Bugfix