erlang: STORE B cleanup and unit test