Many checks off the todo list, test fixes