Phoenix config changes; cleanup

- CHANGED Moved helper functions to Window prototype
  to make code more legible.