refactoring: split utils.js
refactoring: don't use Fn class when unnecessary