Move Scratch Pad code from webapp to new module.