Refactor and improve rant generation