Added globals.h and constants.h to define the data-structures and
variable required at the global scope of the program.
Modified documentation accordingly to elaborate understanding of the
code flow.