Some updates to the original version. Mainly style.