Abstracting graphics and data source

Set apart of basic and common functionality for graphics and data
source.