Mass typo and little fixes so that it compiles