added ferry's first comments and improved the parser code a bit