Cleaned up file, added exceptions for Ames files, added substantial documentation.