Background proccesses are now waited for properly, added more comments and added functionaly for cd command.