Cleaning code. DOES NOT COMPILE YET.