Fixing #6. Also changed documentation