Refactoring
-Removed some lines used for debugging
-Removed some extra code for step-by-step