Removed most cyclic function calls