Math in percent calculations should actually be right now, added more
properties to JSON and debugged it so that it actually works now.
merge to master