Refactor BugLayer to extend connection, and rename it to BugConnection to save confusion