start of rejig of internals and switch to Literate Erlang