Cleaned up and made work.