Fixed class/ref definition
Fixed uint vs. int
Cleanup of consts/enums