Optimize return types
Right now, a lot of the functions and class methods have their return types explicitly defined. This can be quite cumbersome to manage, and TypeScript automatically infers the return type by default. It's more or less writing repetitive and unnecessary code.