Added more comments in Main and ResourceManager