Deleted some duplicated code
Refactured api test selection
Improved missing job message - test
Use subprocess32 instead of subprocess
Removed 'dead' code