Commented code and did some cleaning