Move ui listeners to bottom of file