Final touches

Remove comments and unused functions
Added some explanation
Child process may leak when exit, not fixed