fix Class API p() -> format()
remove unused class api
remove unused code