chased down memory bugs, more extensive use of sync