Adapted error codes/returns to strongly typed enum