Few changes done to getpredicates and getliterals. Still sorting is pending