[sr-dev] git:master:d02c0422: lost: fixing a memory leak and minor code refactoring and improvements