Added problems 3-13 to the readme. Some refactoring of the code