Cleaned Code. Will Need Merge