Working as per Jack's awesome suggestions! #163
Need to work on tests though