added support for class constants
safe plain type handling
still not sure about floats and doubles, but here we go