MAJOR IMPORTANT REFACTOR ESSENTIAL NEW FUNCTIONALITY