New commands/config

Also refactored some common stuff