fixed a few statics things, added some tests
merge