Cleaned up the code a bunch.