Minor fix for the compilation
Recording almost good, works for red and green ball also refactoring of the source code