Added open digest implementation
Some more structure change, parses header correctly