Solving theory part.
Little code enhancement.