Some code cleanup, unused vars, definitions...