Removed static-lifetime for string arguments
Replaced to_string with as_slice
Replaced if-else with match