code refactoring to remove redundancy, fixed bugs in no results for list, fixed bug in clear (issue #30)