minor cleanup
using a shared singleton object instead of appdelegate