Separated javascript from html. Javascript is now more flexible