clean up styles, fix swap js function