fixed warnings and comments