added support to slim engine/layout to webmate. code is raw