added windows registry class and applied few fixes