Updated API to simplify alloy view usage