Added logic for GcdFragment; v0.1 ready