A bit more abstraction.

Signed-off-by: Stanislav Demyanovich <stan@angrybubo.com>