Pull in cmath on RPi and namespace pow correctly
just initialise preferences window once rather than re-creating on view