refactor(interimElement): refine API, better error handling