A little refactoring for better clarity in web pkg