Cleaned up debuggig code