Reorganized code.
Added LICENSE and TODO.