Few bug fixes and feature additions