Refactor some getAt() methods.