fixed documentation and some issues, implemented input/output, added makefile