Added attribution and cleaned up a bit