Code optimization, props @maxme.