Many bug fixes, commit changes, and prepare a file for future use