Cleaned up form code for adding and editing todo lists