Clean up. Add functions.