#24

Updated the library to fix cost calculations in genmodule.py.

Moved cost to a "usage" field, and added diff to 'ref'
@saroele: could you check the code, and give some proposals for usefull library tests?