Added attribution and cleaned up