Implemented first and rest.
Implemented debug mode.