Fixed default parameters. Refactored a bit.