Moved style application into external method (for looping purposes)