Refactored Complex to be simpler and faster