Made method debuggable and improved tests