Added a few more features and cleaned up messy code.

Signed-off-by: Brandon Ingalls <blingall@mtu.edu>