Initial version of Flow class (with JUnit testing)