Minor code editor optimisation.
Simplified some ComponentPeer methods.