Code refactoring in the query builder. Now, we treat the relationships properties right and we reset the counter to zero when we dont have more boxes in the diagram. Some styles changed too.