Rewrote some list functions