Update of files

Use new typedef for Price and Discount, some refactoring and little
fixes.