[refactoring] removed redundant code and unnecessary type parameters