Minor changes.
Refectored the platform code.