erlang schema refactor

move reusable erlang bits to cuttlefish