Fix Program Entity

Duration was a boolean instead of an integer.
Also added some tests for boolean properties, since there are bound to be a few.