Fixed some rendering and removed some unneeded code