Split post and put handlers. Some fixes.