added ManageFlashCardsWindow
also some code refactoring