Construct UI dynamically instead of hard-coding