Final changes to the code (does not include final comments)