Cleaned up syntax issues, minor refinements.