Split controller code into multiple controllers for clarity, and added delete button