Removed old code

Deleted obsolete function and call to function