Added comments removed dead code