Code clean up.
Some small bug fixes.