improve error handling
Remove unused value
Clean up sources
Switch player pixmap using parity