Various bug fixes and optimization