Extracted all checks and subsequent updates to a factory method from the
Extracted all checks and subsequent updates to a factory method from the constructor. Reordered checks to check for nulls before anything else. Also existing connections before security breaks. Fixes TileController#checkController() using the wrong position. Added debug logging for failed connections.
SonarQube analysis reported 10 issues
Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here: