3.16: rewrite static capes

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>