Fix most compiler warnings: Add type annotations and missing declarations, remove dead code. Fix filter by line in StopSet.find.