fixed circular json ref issue and updated rakefile

- rakefile got corrupted during merge.

Signed-off-by: Chris Jones <chris@jonezy.org>