Refactor: snake_case -> camelCase, minor changes to some func inner structure (ty golint).