Hi, not discouraging further responses, but you may be interested in this older thread with answers by /u/restricteddata.
Yes the bombs were actually meant for Germany. It was only their prompt surrender before the bombs were ready (not that they knew they dodged the bomb) that saved them. The bombs were them freed up to force the surrender of the final remaining Axis, Japan.