Fixed bug with text entry and consolidated code on details page