Fixed small issues, improved performance further