Fixed doctrings.
Added validator for maximum value (closes #31).