various code improvements