Sixth commit, made small changes after talking with Jim