Fixes most of the warnings. Leaves some warnings on functions marked TODO.
lists not working yet; requires a major modification of the specified algorithm, since we can't fill lists by reference in Elixir