Added Rakefile.
Refactoring & Testing.