Merge pull request #1 from xrotwang/master

code cleanup