Lots of SRL bugfixes