adding controller changes
Adding rest of the changes.
model changes