complete rules in json api
fix storing/loading actions
added api to remove rules
refactor json api declaration a bit