removed some of the canonical code that is not used. still a lot more to go through