Doc cleanup and merge changes.
Rewrote priority function so it works nice with view actions that are added later on