cleaned up some code, and fixed a few things, stated the detail view