some refactoring of API, and fixed Edit player screen