added ajax/json result type support
fixed removed Db dependency