fixed warnings; added read/write methods; fixed docs