moving class implementation into src/

this is typical for dart code layout. Top level libraries files will have functions or typedefs but usually not classes.