Fix query error
Add answer link and more refactoring