More logical structure of the solution - finished.