Improve generics usage in interfaces. Refactoring implementation to implement fixed interfaces.