Improvements and minor bug fixes
t