Removed debug code, done Substring