Minor edits / refactoring