Misc. bugfixes; attempt at proper use of Deferred but it isn't, really. Don't use .scan unless you like lag.