cleaned up debugView code