Added a Makefile and made changes to work in Linux