Solved problem 50 to 56
Simplified some solution.