Add button finally working. Now still need to fix all the possible errors.