Made some minor refactoring changes