Getting rid of a lot of copy and paste.