Allow customising of the bar style
Use localisation rather than hardcoding languages
Remove unused code
Avoid repeatedly removing from arrays for improved performance
Simplify initialisation