lots of fixes and a lean fix for Philip...