Cleaded up some code, eliminated unneeded lines