Refactor getCommentFlags to getFlags. Setup retrieving profile/app flags.