improvements on jquery and buttons