Removing un-used method and variable

Removing un-used code. This could be easily be picked by jshint with the  "undef" and "unused" options set to true.