more code refinements

more code refinements for bars operations