Added functionality

Program now uses xrange for higher efficiency; also only checks divisors
up to half of the given value.