Revert "use implicit condition"

This reverts commit 608d8bd2e9ef3038d78a90174b541f0c3dd78142.
split UI code into its own file
only import what's required