Some code reduction