Added makefile
Added some  global variables and functions