Cleaned up and seperated out the references.