Applies OOD patterns on Erlang