Added a few more features, and corrected a few errors. Tested on lab machines successfully.