Refactoring gemäss fosaguide (close #3)