Fixed some problems with enums, wrapped enum in a namespace to avoid forward declaration error.