refactoring. copyrights and --direct-surface behaviour improvements