cleaned up a bit and removed some unused methods