Fix dialyzer and xref warnings

Let's get this build SUPER GREEN