cleaned up image code and new migration