When organizing my novel, I divided it into sections. At first I simply split it intuitively where it "felt right" to do so, points where there were big changes in story structure, setting, new characters came into play or something else made relevant changes to what was going on.
This division into sections allowed me to think about my novel as seven smaller sections, instead of one big mess. What was inside one section can be changed more or less freely, as long as the characters start the every section in the same place they finished the one before and nothing extremely weird or contrived happens to be ignored later.
Later in my work I edited those sections a lot, moved elements around and even merged two sections, because one of them lacked conflict and felt too short, but that is a later stage of development, and by this point you should already have a pretty solid idea of what your plot and story structure are. First of all, write everything you have lying on your mind, make it beautiful and organized later.
After writing crude summaries of my sections, I studied story structure, especially the Hero's (and Heroine's ) Journey and ways to structure plot, especially the Snowflake Method and used those to organize the events of the story. Conflict was upscaled, downscaled or moved around, character arches were extended or shortened, you get the idea.
Now that you know your plot's bones, figure out what skeleton they will build. Shuffle them around and play with them, trying to figure a good order. Insert the dialogue you have already written in the section, scene and act it belongs to, preferably as a side note or comment or in any other way separated from the plot. Dialogue and plot are different hierarchical levels, do not mix them.
As for character motivations, my best advice is to keep them separated from the file where you keep the plot. Personally, I enjoy having one separated file for every major character (or any character I, for whatever reason, know a lot about) and a separated file for all minor characters. If you find it really necessary, make small annotations on the plot file on why a moment, action or line are relevant for a character and affect or are affected by their motivations.