More edits...some refactoring