Undid a lot of the speedup hacks - too buggy