Changed data.resource to async for better useage. improved routing with api and routing.