Debug statements.
Severals bug corrections.