Keep controller slim

Move code checking input data into separate methods to keep
the code complexity low.

Signed-off-by: Christoph Kassen <christoph@kassen.name>