Moved game functionality into func module.
Moved incorrect format error response into a function.