Split context into root and web.
Fixed generation of String IDs for MySQL.
Refactored access to cloud environment info.