Small refactor and fixed #62