Fixing bugs memory leaks and buffer and stuff.

Minesweeper is mavenized and actually can detect when some one wins. Oh yea added an optional 2nd parameter to let the user input the number of mines to drop on the field.