9/18/2014 - re-implementation done, code cleaning