Added class documentation and did some cleanups

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>