Refactor of register method Trello 174