Initial debugged version.