Cleaned the code up alot.