Button: several small memory optimizations