minor refactor of api class to breakup huge handler
make discuss link conditional depending on source