minimax working
some reorganizing, removed java impl
fixed missing import