cleaned up code, began work on shared memory