Added tabs support and moved javascript source to its own file.