minor additions & serious speedup in performance (caching and stuff