Corrected abstraction and accessor methods 

Also removed unused variables.  Previous pull request was #1441 but I've made sure to not use the enhanced for-loop due to GC issues (the things you learn!) :)