Clean up code and remove io:format statement.