Cleaned up code..