MNT : minor PEP8/pyflake changes
MNT : refactored/simplified userapi/commands.py