Bug fixes, style tweaks, better POST fail handling