Code imported from http://code.getadblock.com/releases/