Added some improvements to requested functionality