Now Working. Code Cleaning Required