Moved common functions of the views into APIItemView