Makefile created, issues with exit() being called with wrong signature fixed.