Added basic support for DOC, PNG and GIF
Added some exceptions for weird situations
Added (nearly) full test coverage