Fixed the license header in os.c
The remote protocol no longer uses protobuf for internal communication
Moved all global variables into globals.h/globals.cc
Refactoring global functions in os.h - no functional changes