Marshall device number & purify getDevnum
Use ty syn (RawFilePath) for paths
Purify some functions
Fix examples
Marshal action values