Fixed getStatNamed and refactored some things to use isNamed.