Build entries in a different class.

Extract reusable methods to helper.rb.
Make errors more usefull.