added handleing barlines. also some new errors