Added simple code to insert barlines.