Added all functionality.  Now the debugginh and testing...