cleanup and binary size reduction