Calculator: Trim produced UI & primality test code