code-style fix
refactoring
removed unused functions