Added basic support for pixelmon.
Fixed some long standing issues.