Moved the most complex parts of pushto into their own commands.