Adjusted JS and added actions to the forms