Reserved ip tests added and code refactored