A few 1.2 updates.
Small refactorings.
Fixed double enum member definitions.