Clean backends interface

Use inheritance to define an interface for backends

Remove global variables.
Remove all jshint warning where possible.
Add graphite utility.