Finished TODO regarding esThdSetPrio() function
Minor code formatting