Removes multilevel support for graph layout algorithm.

- Simplifies the algorithm by removing the multi layer implementation.
- Duplicated code in html files moved to js file.