Program Verification And Refactoring In Answer Set Programming