fix bugs in executable
make fixes portable
Merge pull request #6 from bcdarwin/investigate_memory_use

fix bugs in executable