added parser for main gallery page + test + small refactoring