Properly understood the entire program after some confusion during the implementation. Throughly commented each important function in the code. Now onto the next chapter :D