cleaning up code: removed unnecessary const, added type hints to avoid reflection