cleaned up minor spacing
added detect method and renamed detect method to floodfill
changed L blocks to . for readability