fixed some style and free some memory at the end
Merge branch 'master' of github.com:mnisjk/snake