Code Revision

Cleaned the code