Added ip validation and converting ip to numeric with apropriate unit tests.