split daedalus into multiple files and added basic tests