cleanup and docs
use snapshot_t*
fix linux support