Virtually a complete re-write