refactoring: moving generic ip space oeprations up
refactored bitrange, removed quotient type