Finished lesson 7
Some refactoring