Working through bugs

Trying to fix some stuff.