Beamer optimization working in BFS.