Much nicer code.