Added exceptions and some stubs
Added reading and writing the plain text
Updated comments