Adding semaphore implements Class and reformat codes of projects