Upgraded source to work with Pyramid web framework