Implemented feature. Added some comments