Implementing Charles' changes, some errors thrown.
Fixed major errors, still needs some styling.