Pull request for 99 problems in Erlang implementation

Feature branch for #1 (continuation from previous pull request).