Implete the funcitonality of preview image generation
Delete unused files