overall small code improvements, readability