Stack Overflow functions added
Cleanup