Add sphinx documentation.
Change priority behavior.