Avoiding repeating CAKE_VERSION and DB over and over, adding to global should do the trick.