Small BML tweaks + a bit more complex JS