cleaned up entity/unitframe code and deleted unused classes