HUGE code optimization. Moved all valeus to dictionaries