Use relative imports and fix except syntax