Moved old functions to oldstuff.cpp