Refactored web page elements into separate classes

Split the large Graph class into a seperate class for every screen
element. These elements communicate through a simple pub/sub based event
handler.
Removed unused code