Minor bug fixes.
Pushing all the code!