Made Various Attempts to optimize the Clingo Code