Performed some cleaning on the code