loading pages from extensions

This is old code formatted by me. Will fix this across the ES code base. https://wso2.org/jira/browse/STORE-568