refactor, bug fixes
fixing edge render, refactor, bug fixes