Revamped form code