Level validator

Fixes #52