Update to 1.5.2, some code cleanup