Re-factoring done and README updated