More documenting
Added error enums
Fixed redefiniton