cleaning up html and creating a seperate file for loader js