Changed thread priority to max. Added some comments.