fix ref lists and multi-call rendering, thanks @RoryH. close #27.
add output tests