Cleaned code for the tool bar creation