build: removed unused references.
refactor: clarified the exception message.