Deleted unused function
Moved function to tidy up global namespace