fixed memory size bug, got rid of all the damned pointers!