Last bugs and features.

Time for some serious testing...