first round of bugfixes down, many more to go