Made database controller & form helpers more compatible with JSON approach