Optimise code, fix selectors and use chaining