new main w/ lots of defect fixes