Extract methods from the roll method

Signed-off-by: Igor Popov <igor.popov@napa.fi>
Simplify conditional

Signed-off-by: Igor Popov <igor.popov@napa.fi>