Some more code polishing