Removed input field, added event.preventDefaults to functions