Merge pull request #1 from maratoid/master

fixes, reame, re-arranged params