Refactor edge finding, add transparent conversion first pass