Made some progress, but ended up hacking as I was impatient to see it working. Still need to implement credits.
Merge remote-tracking branch 'origin/master'