Made some improvements, added some content from Daniel