Added result representation and debug comments