Reorder functions in Core and change __getattr__ to use helper functions looked up from a dictionary. Fix problems with type propagation in sort() method and also duplicate column problems.