Further Improvements

Various bug fixes and performance improvements