changed models folder to lib; started refactoring minimax