Refactor a little

Take advantage of the (new to me) pipeline operator.
Update license