Added generic vertex and edge work charging.

This serves the requirement for problems 2 to 7.
The 1 fucking problems remains before I can move to report writing