add comments and flesh out some of the movepid code

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>