General changes, make some stuff work and clean up a bit.