Improved comments and fixed suppresed some warning of unused variables