Separated bonds into sub-bonds to help program layout, cleaned up and added other miscellaneous code.
Pull from master.
Merge branch 'master' of github.com:colin-daniels/ct-optimize