Bug fixes and debug breakpoints added