Got rid of unneeded code mostly