Starting work on cross-platform support. Mainly plugin cleanup.