constants for ftok, moved main() cleanup code to end using gotos to reduce code duplication, started implementing semaphores for backend shm