Premature optimizations to calc_occs. Discover memory problems. Update readme.