Minor changes and debug.