This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.
Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
`Time.now` was being used to fetch the current time, twice in the
same line. This commit stores the time value in a variable and
reuses it instead of generating/fetching it for the second time.
Additionally, a guard clause in the same method is substituted by
an `if/else/end` block for clarity.