Improve coverage & code refactoring