Make "build_messages" method private