Move some precalculating to background threads so program can start faster