Lotto: Refactor CLI according to toolket changes and clean the code