Tests and removal of old functions