+ fix typo
+ fix phoenix functions to compile on ubuntu 12.04/c++11
+ cleanups