Bug fixes, updates, optimizing