Refactor into html helper method, add unit tests to readme.