Refactor graph styles holding objects. Small style fixes.
Split js code. Added cache and changed loading mechanism for js sources.