added rounding, error handling, improved Makefile, added a smaller testing file