[refactor][s]: split out methods to make code clearer.
[fixes #15,bugfix][s]: stop removing first item from file list when prefix present.