Some minor code adjustments