Fixed a bug occurring when the JSON .rpc part failed, not showing the error.
Fixed some potential bugs and started preparing for implementing crafting.