puzzles: refactor rockbox frontend

Cleaned up a bit of copy-pasted code and added some useful comments.

Change-Id: I9a6f37acbeeda58b3ea8c65ee96230372400f323
3 files changed