Add some tests and fixup some stuff in order to actually pass those tests. Well most of them