Refactored the hole class connection. Split it in more classes.