fixes to work with latest core, and some seemingly left over RDS

changes.  Drew reject this if it turns into a merge nightmare, and i will sort it.