WIP fix xref errors
WIP fix dialyzer