Code corrections/cleanup