remove superfluous dereferencing, change while to for loops
add makefile
update documentation