Corrected abstraction and accessor methods as well as removing unused variables.