removed missing sources, added string matching

Removed files that were accidentally to the sources and user.mk files. Added
the 'str_longest' function for trimming a string to the longest substring
match.