Add form handler - needs a complete rebuild due to being a huge mess but it works like I want it to.