Merge pull request #30 from Raynos/master

All the code.