Some minor changes to markup and backend to make it more testable.