First move towards a SurfChart library

Extracted all chart code into a separate module.