cleaned up code and added noscript