Removal of cache, fixing a compiler warning and removing recursive functions.