Minor changes and debug stuff