refactoring javascript code.
added pagination, and a tooltips on schedule cells