Merging in changes from simplify branch