Adding platform code. Collide is broken and unfinished.