Small code improvements/cleanup