Improve codes with dialyzer