Refactored interface definitions to make them more generic.