Initial commit with few bugs.
Separate LISENCE document from README.
Fix code format.
Refactor a bit.
Merge branch 'master' into gh-pages