Use XUL builder to simplify the code