Restructuring for model, controller, view. Debugging in process.