Refactor algorithm used to build process tree.
Fix bug regarding inode allocation.

This version is ready for class demo.