move output after file move
fix initialization problem in points_hit and some general cleaning