Added start and end checks.
First version finished, posted.