Merge pull request #49 from jochenberger/optimizations

remove unused variables, make some methods static
use `charAt` insteadof `startsWith`/`endsWith` when checking for single characters, reduce number of calls to `isNullish`