optimizations, refactors, new tweaks