documentation
fixed makefile
added some memutil code