This is re-work of the previous commit (064898ceee)

* Re-works to maintain complete (we think) backwards compatibility
* Moves functionality into the scope of only sqerl_rec