Remove C-Style arrays and add assert statements for testing canonical
form. Also indent source correctly.