Implement invoicing

## NOT READY TO BE MERGED YET