need to refactor and review for light.
starting here with the refactor
refactoring of poly code here, need to make things uniform,simple