Added licenses, and more code formatting to comply with styles.