Refactor code. Bug fixing.
Merge branch 'master' of https://github.com/petropistun/trunk_autoopen