Refactorinf squid3 app