Fixed compiler warning and added new features.