serious refactor and clean, working Or support