Exposes mode parameter in play state
Cleans up and re-indent directives
Fixes using chapter id instead of index and pass mode parameter when switching to play state