Cleaned up code. Program working.