Refactor methods, add updating logic for layers after an answer is found.