refactor and simplify main button bar code: moving towards themeing