Platform fixes.

Also added level editor class.