Minor code improvements; comments