Fixed some references to old code + updated for Pyramid 1.4.5