integration of image parsing code + stylistic fixes