enum-ified constants, specialized exceptions, more documentation