Some preliminary charge code

Doesn't remotely work yet, but the skeleton is there.  Committing so I
can access it from another computer.