Some fixes, documentation and better scripts