Remove unused variables and helper functions
Merge pull request #817 from tricknotes/remove-unused

Remove unused variables and helper functions