Some refactoring

- JsDocs
- renamed functions in consistent way
- moved helper functions to the utils
- deleted unused(overheaded) functions
- configurable options
@Shuhrat, кто ж так параметры именует? =)