fix naming convention
fix some compilation and runtime errors