fixed a typo
various optimisation.
Fixed a problem with labeled frame.
Fixed stuff in the Platform class.