Added a Cost class and a little example