Fixes for the last commits and ordering code improvements.