made connecting lines move when new free space is lessened, cleaned up code
merge conflict fixed