This looks like 125 lines of copy paste. Wasn't there any cleaner way to do this?