Cleaned up and made a few minor additions