Seperate some inline classes into simpler helper classes