REWRITE

Cleaned up large portion of code