Add six and work out various compatibility issues