Removed unused and old javascript code