Some refactoring and updated docs

@gottwald i made some refactoring. Mainly changed arguments, 1 instead of 4. Also updated docs.