make noparse use scanner directly when not called from editor
cleanup code a bit