Added option to switch between new and old rectangle format.