Added documentation
renamed return value constants to something more meaningful names