Fix and implement a lot of new types and methods