Minor cleanup

Added simple Makefile, and changed code according to tips I found on SO.