reorganized code, added playingfield class