Small refactor and added tests for init method