Weights and price

Fix weights and price calculation, using system formatting. Some other
bugs.