Fixing failure reset, and refactoring variable failure to remote_failure
Reformatting SSH error to use format instead of string concatenation
Moving check timer closer to return statement, and fixing termination checks edge case for remote tasks
switching dict check in API to .get()
misc fixes