refacto: move functions around
chore(jshint): add more rules
test: update tests
chore: makes jshint happy