add messages to view. clean up controller