added the scala doc for HBSE
Added some fixes to HBSE so it caches the graph after each stage