Added dynamic bracket structure, added supporting methods in controllers and model