Add a link to the orig post
Some function refactoring