Some fixes + documentation