Split up code
Updated cli