Change some typedef stuff. Add more tests. Fix some path stuff.