Reformatted code and improved detail ui.