rewrite the wordmovecontroller, making it easier to test and read