Simplify core (the rest of the changes from the simplify branch)
#4029
+1,464
−363
simplify branch)
#4029