PNG parsing

Added more of level 14 unit tests, removed duplicate code and I hope I did it better.