fixes code so it can be build on thymine
adds docs
quick exit on singleton intervals
fills the cache using a DFS