fixed warnings and removed comment-out code