Added LICENSE, README and fixed bugs.