Remove trailing spaces
Allow input from stdin + add input stream type opt
Merge pull request #1 from backmask/master

merge backmask commits