Test cases in Mocha, readme updated and code cleanup.