Added more comments, made view optional