split classes and added a image parser