Removed unnecessary line (for purposes of example) and refactoring a bit.