refactoring config enabled checking
removing duplicated is_valid_ipv4 method
if something is != false, it's better to just check if it's true, right?