rm unnecessary var
streamline boundary check in preparation for eventual move to the only object that actually uses this function
simplify
rm unused variables
Merge pull request #491 from Trott/refactor

rm unnecessary var