Almost done!

Everything seems to be there but not thoroughly tested yet.