indent fixes, some small bug fixes.