added support for a player menu. fixed some miscellaneous bugs.