The middle layer code (still needs fine-tuning).
Changed the URL