optimized GeneElement.pm which was inefficient before, still could have some space optimization