Refactored so we can use a makefile