Improv code; fix bugs