Added memsets to clear the buffer, fixed some funny business
Added a Makefile