Fix byte-compilation warnings, and add smex- prefix to helper functions