toJSON fixed, unnecessary parts removed