edge detection / auto tile updates

re-worked the edge detection and also added code to pull different parts
from the auto tiles