retest all functionality, fix any issues during refactoring, minor optimizations
--