Implement broken SGB functionality
Fixing tests