Patterns applied for structring of code