2013-Dec-28: implement missing features (phase 0). Needs some clean-up.