Quite a few fixes, couple of new features