Added enum support and some documentation