Removed pretty much dead code. Small optimisation