Minor corrections.
Added sample test and exercises.