Cleaned up to start from sratch at a later date.