Merge pull request #27 from leoliu/master

More code cleanup