Refactored create bid JS.