Better borders + refactored algorithms / gui links