cleanup phoenix config
make phoenix math make more sense
remove unused code