Fixed min/max bug for time
mem API fixes and docs