Code clean up

Comments and whitespace cleaned up
Fix issue with forking

When Process.wait is called without a pid, it waits for just the first
child process to exit before moving on. It also throws an error if a
directory is found to be empty.

This is now fixed by using Process.waitall instead, which waits for all
child processes to exit before moving on. It will also not throw errors
when no child processes exist.