code is cleaned up somewhat, but saving is nonfunctional for now