Merge pull request #24 from xtao/vilya

Move code to vilya.
Add debug mode.