Get WEBMS dir from env vars.
Bugfixes, memory leak stuff.