some cleanup, json directive and responses to the module