Hacks to get this working for my needs.