Building a webapp framework