Refactoring code in RPS branch

@gabebw @jsteiner
This does two things: output the results, and return an outcome.