Cleaned up player.madao. It works!

Still TODO for that file: logging, testing, and API matching.