Add basic asset writer

Also updates API.