fixed formatting problems, added debug info to parser