fix order of genes
misc code cleanup