Cleaned up code in general except for CLevelSet