The indentation in these methods seems to be mixed up slightly ...?
Also I personally disagree with current 'step function' idea. Surely we can do this in a much better and clearer fashion no ?