Moved definition of function to separate cpp file in order to reduce header file dependencies. Removed unnecessary headers and updated Visaul Studio project file