Added getters for the flags and target, and unit tests for these properties.