Made some code cleanup