Created helper function affectingSelf
Moved CLI to its own package