Merge in crap I did ages ago

@jaredstreich can look at it if it's useful.