Added in most functionality.