Fix a lot of bugs. Especially the form bugs.