Remove temp variables for form fields
Reduce function sizes
Better key detection
Fix whitespace