refactor

@DQNEO 
レビューをお願い致します。

I think assigning NULL at the end of program is a good manner. isn't it?