Integrate the code with Lam's code together. This is the code for Prototype 3.0.