Added pseudo-code as well as open and closed lists to the algorithm