Updates to clean up code

Also adds additional changes by fellow collaborators.