Fixed erlang compile functions and added repeat key