moved reflector, singleton and array stuff to type system