Corrected all code. cleaned and reverted to previous version.