Refactored, added base classes for fluid simulation