add /files and /libs
Adjust event priorities and add more comments