AbstractCommand and CommandCallback are now generics. This refactoring reduces type casts in code