preliminary performance tweaks using static variables
more performance enhancements