v 0.3 small re-factoring

this still needs more re-factoring to get the performance up,
e.g. tree structure should be used for possible moves