Fix return values and add boolean tests for layout manager