Fix drawing of the borders
Delete some poor code