Form is now working, table inserted and things are a little cleaner