Too many changes for one commit but here it goes.