move more functions into webworker; use message passing for UI functions