Cleaned up code & added some small stuff.