Remove setInterval from function

Removed setInterval from function to prevent duplication of functions and page crash.