more fixes, updates, optimizations