Add generic list structure
Get file list
Simplify string operations in mailfs a bit